% output : matrix of thresholds.

% There is one column per feature.
% Each column is a list of thresholds, evenly spaced, between the highest
% and lowest value found in the training set.

% Note : the training data might not have the same max and min. But this
% should still work.

% TODO : use buckets on a fraction of the examples.

function thresholds = findThresholds(DataSet)
   disp(sprintf('Number of thresholds : %d', DataSet.numThresholds));
 % compute the max and min values, for each feature.
   maxes = max(DataSet.x); % row of length numFeatures
   mins = min(DataSet.x);
   steps = 1/(DataSet.numThresholds+1)*(maxes - mins);
   thresholds = zeros(DataSet.numThresholds, DataSet.numFeatures);
   a = 1:DataSet.numThresholds;
   a = a';
   for feat=1:DataSet.numFeatures
       b = steps(feat)*a;
       thresholds(:,feat) = mins(feat)*ones(DataSet.numThresholds,1) + b; 
   end
   %maxes
   %mins
   %steps
   %thresholds
end